<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/page/common/head.jsp"%>
        <div class="right">
            <div class="location">
                <strong>当前位置:</strong>
                <span>商品入库管理页面</span>
            </div>
            <div class="search">
           		<form method="get" action="${pageContext.request.contextPath }/sys/goodsStorageRecord/list">
					 <span>商品入库编号：</span>
					 <input name="goodsCode" class="input-text"	type="text" value="${goodsCode}">
					 <span>商品名称：</span>
					<input name="goodsName" class="input-text"	type="text" value="${goodsName}">
					<span>付款状态：</span>
					<select name="payStatus">
						<option value="">--全部--</option>
						<option value="1" ${payStatus == 1 ? "selected=\"selected\"":"" }>未支付</option>
						<option value="2" ${payStatus == 2 ? "selected=\"selected\"":"" }>已支付</option>
					</select>
					 <input type="hidden" name="pageIndex" value="1"/>
					 <input	value="查 询" type="submit" id="searchbutton">
					 <a href="${pageContext.request.contextPath}/addGoodsStorageRecord" >添加</a>
				</form>
            </div>
            <!--用户-->
            <table class="supplierTable" cellpadding="0" cellspacing="0">
                <tr class="firstTr">
                    <th width="10%">商品入库编号</th>
                    <th width="10%">商品名称</th>
                    <th width="17%">商品描述</th>
                    <th width="5%">商品单位</th>
                    <th width="10%">入库数量</th>
					<th width="10%">入库商品总额</th>
                    <th width="8%">支付状态</th>
					<th width="10%">供货商编码</th>
                    <th width="20%">操作</th>
                </tr>
                   <c:forEach var="Record" items="${pageInfo.list }" varStatus="status">
					<tr>
						<td>
						<span>${Record.goodsCode }</span>
						</td>
						<td>
						<span>${Record.goodsName }</span>
						</td>
						<td>
							<span>${Record.goodsDesc}</span>
						</td>
						<td>
							<span>${Record.goodsUnit}</span>
						</td>
						<td>
						<span>${Record.goodsCount}</span>
						</td>
						<td>
						<span>${Record.totalAmout}</span>
						</td>
						<td>
							<span>
								<c:if test="${Record.payStatus==1}">未支付</c:if>
								<c:if test="${Record.payStatus==2}">已支付</c:if>
							</span>
						</td>
						<td>
							<span>${Record.supplierId}</span>
						</td>
						<td>
						<span><a class="viewUser" href="${pageContext.request.contextPath}/getAllRecord/${Record.id}" Recordid=${Record.id } goodsName=${Record.goodsName }><img src="${pageContext.request.contextPath }/statics/images/view.png" alt="查看" title="查看"/></a></span>
						<span><a class="modifyUser" href="${pageContext.request.contextPath}/updateRecord/${Record.id}" Recordid=${Record.id } goodsName=${Record.goodsName }><img src="${pageContext.request.contextPath }/statics/images/upd.png" alt="修改" title="修改"/></a></span>
						<span><a class="deleteUser" onclick="deleteById('/deletRecord/',${Record.id})"  Recordid=${Record.id } goodsName=${Record.goodsName }><img src="${pageContext.request.contextPath }/statics/images/del.png" alt="删除" title="删除"/></a></span>
						</td>
					</tr>
				</c:forEach>
			</table>
			<div class="page-bar">
				<ul class="page-num-ul clearfix">
					<li>共${pageInfo.total}条记录&nbsp;&nbsp; ${pageInfo.pageNum}/${pageInfo.pages}页&nbsp;&nbsp;&nbsp;&nbsp;</li>
					<c:if test="${!pageInfo.isFirstPage}">
						<a href="${pageContext.request.contextPath}/sys/goodsStorageRecord/list?pageIndex=1&goodsName=${goodsName}&goodsCode=${goodsCode}&payStatus=${payStatus}">首页</a>
						<a href="${pageContext.request.contextPath}/sys/goodsStorageRecord/list?pageIndex=${pageInfo.pageNum-1}&goodsName=${goodsName}&goodsCode=${goodsCode}&payStatus=${payStatus}">上一页</a>
					</c:if>
					<c:if test="${!pageInfo.isLastPage}">
						<a href="${pageContext.request.contextPath}/sys/goodsStorageRecord/list?pageIndex=${pageInfo.pageNum+1}&goodsName=${goodsName}&goodsCode=${goodsCode}&payStatus=${payStatus}">下一页</a>
						<a href="${pageContext.request.contextPath}/sys/goodsStorageRecord/list?pageIndex=${pageInfo.pages}&goodsName=${goodsName}&goodsCode=${goodsCode}&payStatus=${payStatus}">尾页</a>&nbsp;&nbsp;
					</c:if>
					</ul>
				<span class="page-go-form"><label>跳转至</label>
	     <input type="text" name="inputPage" id="inputPage" class="page-key" />页
	     <button type="button" onclick="goindex('/sys/goodsStorageRecord/',${pageInfo.pages})" class="page-btn" >GO</button>
    </span>
			</div>

<!--点击删除按钮后弹出的页面-->


<%@include file="/WEB-INF/page/common/foot.jsp" %>

